<template>
  <div class="mt-8px" @click="onNav(path)">
    <div class="text-18px font-bold line-clamp-2">
      保姆级建站教程，从部署到优化，一次全讲透|2025
    </div>
    <div class="flex mt-8px">
      <img
        src="../../../assets/image/communication2.jpg"
        class="w-100px aspect-video"
        :class="menuIndex % 2 === 0 ? 'mr-8px' : 'ml-8px'"
        v-if="menuIndex % 2 === 0 ? true : false"
      />
      <div class="flex-1 line-clamp-2 h-32px text-16px">
        从零开始搭建一个游戏网站，如何用游戏网站盈利从零开始搭建一个游戏网站，如何用游戏网站盈利从零开始搭建一个游戏网站，如何用游戏网站盈利从零开始搭建一个游戏网站，如何用游戏网站盈利
      </div>
      <img
        src="../../../assets/image/communication2.jpg"
        class="w-100px aspect-video"
        :class="menuIndex % 2 === 0 ? 'mr-8px' : 'ml-8px'"
        v-if="menuIndex % 2 === 0 ? false : true"
      />
    </div>
    <div class=""></div>
    <div class="h-1px w-full mt-16px bg-[#aaa]"></div>
  </div>
</template>

<script setup>
import { defineProps } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const props = defineProps({
  menuIndex: {
    default: 0,
    type: Number,
  },
  path: {
    default: '/',
    type: String,
  },
})

const onNav = (path) => {
  router.push(path)
}
</script>

<style lang="scss" scoped></style>
